3.271 \(\int \csc (c+d x) (a+b \sec (c+d x))^n \, dx\)

Optimal. Leaf size=115 \[ \frac{(a+b \sec (c+d x))^{n+1} \text{Hypergeometric2F1}\left (1,n+1,n+2,\frac{a+b \sec (c+d x)}{a-b}\right )}{2 d (n+1) (a-b)}-\frac{(a+b \sec (c+d x))^{n+1} \text{Hypergeometric2F1}\left (1,n+1,n+2,\frac{a+b \sec (c+d x)}{a+b}\right )}{2 d (n+1) (a+b)} \]

[Out]

(Hypergeometric2F1[1, 1 + n, 2 + n, (a + b*Sec[c + d*x])/(a - b)]*(a + b*Sec[c + d*x])^(1 + n))/(2*(a - b)*d*(
1 + n)) - (Hypergeometric2F1[1, 1 + n, 2 + n, (a + b*Sec[c + d*x])/(a + b)]*(a + b*Sec[c + d*x])^(1 + n))/(2*(
a + b)*d*(1 + n))

________________________________________________________________________________________

Rubi [A]  time = 0.118902, antiderivative size = 115, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 4, integrand size = 19, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.21, Rules used = {3874, 73, 712, 68} \[ \frac{(a+b \sec (c+d x))^{n+1} \, _2F_1\left (1,n+1;n+2;\frac{a+b \sec (c+d x)}{a-b}\right )}{2 d (n+1) (a-b)}-\frac{(a+b \sec (c+d x))^{n+1} \, _2F_1\left (1,n+1;n+2;\frac{a+b \sec (c+d x)}{a+b}\right )}{2 d (n+1) (a+b)} \]

Antiderivative was successfully verified.

[In]

Int[Csc[c + d*x]*(a + b*Sec[c + d*x])^n,x]

[Out]

(Hypergeometric2F1[1, 1 + n, 2 + n, (a + b*Sec[c + d*x])/(a - b)]*(a + b*Sec[c + d*x])^(1 + n))/(2*(a - b)*d*(
1 + n)) - (Hypergeometric2F1[1, 1 + n, 2 + n, (a + b*Sec[c + d*x])/(a + b)]*(a + b*Sec[c + d*x])^(1 + n))/(2*(
a + b)*d*(1 + n))

Rule 3874

Int[cos[(e_.) + (f_.)*(x_)]^(p_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_), x_Symbol] :> -Dist[f^(-1), Subs
t[Int[((-1 + x)^((p - 1)/2)*(1 + x)^((p - 1)/2)*(a + b*x)^m)/x^(p + 1), x], x, Csc[e + f*x]], x] /; FreeQ[{a,
b, e, f, m}, x] && IntegerQ[(p - 1)/2] && NeQ[a^2 - b^2, 0]

Rule 73

Int[((a_) + (b_.)*(x_))^(m_.)*((c_) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Int[(a*c + b*
d*x^2)^m*(e + f*x)^p, x] /; FreeQ[{a, b, c, d, e, f, m, n, p}, x] && EqQ[b*c + a*d, 0] && EqQ[n, m] && Integer
Q[m]

Rule 712

Int[((d_) + (e_.)*(x_))^(m_)/((a_) + (c_.)*(x_)^2), x_Symbol] :> Int[ExpandIntegrand[(d + e*x)^m, 1/(a + c*x^2
), x], x] /; FreeQ[{a, c, d, e, m}, x] && NeQ[c*d^2 + a*e^2, 0] &&  !IntegerQ[m]

Rule 68

Int[((a_) + (b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[((b*c - a*d)^n*(a + b*x)^(m + 1)*Hype
rgeometric2F1[-n, m + 1, m + 2, -((d*(a + b*x))/(b*c - a*d))])/(b^(n + 1)*(m + 1)), x] /; FreeQ[{a, b, c, d, m
}, x] && NeQ[b*c - a*d, 0] &&  !IntegerQ[m] && IntegerQ[n]

Rubi steps

\begin{align*} \int \csc (c+d x) (a+b \sec (c+d x))^n \, dx &=-\frac{\operatorname{Subst}\left (\int \frac{(a-b x)^n}{(-1+x) (1+x)} \, dx,x,-\sec (c+d x)\right )}{d}\\ &=-\frac{\operatorname{Subst}\left (\int \frac{(a-b x)^n}{-1+x^2} \, dx,x,-\sec (c+d x)\right )}{d}\\ &=-\frac{\operatorname{Subst}\left (\int \left (-\frac{(a-b x)^n}{2 (1-x)}-\frac{(a-b x)^n}{2 (1+x)}\right ) \, dx,x,-\sec (c+d x)\right )}{d}\\ &=\frac{\operatorname{Subst}\left (\int \frac{(a-b x)^n}{1-x} \, dx,x,-\sec (c+d x)\right )}{2 d}+\frac{\operatorname{Subst}\left (\int \frac{(a-b x)^n}{1+x} \, dx,x,-\sec (c+d x)\right )}{2 d}\\ &=\frac{\, _2F_1\left (1,1+n;2+n;\frac{a+b \sec (c+d x)}{a-b}\right ) (a+b \sec (c+d x))^{1+n}}{2 (a-b) d (1+n)}-\frac{\, _2F_1\left (1,1+n;2+n;\frac{a+b \sec (c+d x)}{a+b}\right ) (a+b \sec (c+d x))^{1+n}}{2 (a+b) d (1+n)}\\ \end{align*}

Mathematica [A]  time = 0.945822, size = 132, normalized size = 1.15 \[ \frac{(a+b \sec (c+d x))^n \left (\text{Hypergeometric2F1}\left (1,-n,1-n,\frac{(a+b) \cos (c+d x)}{a \cos (c+d x)+b}\right )-2^n \left (\frac{\sec ^2\left (\frac{1}{2} (c+d x)\right ) (a \cos (c+d x)+b)}{b}\right )^{-n} \text{Hypergeometric2F1}\left (-n,-n,1-n,\frac{(b-a) \cos (c+d x) \sec ^2\left (\frac{1}{2} (c+d x)\right )}{2 b}\right )\right )}{2 d n} \]

Antiderivative was successfully verified.

[In]

Integrate[Csc[c + d*x]*(a + b*Sec[c + d*x])^n,x]

[Out]

((Hypergeometric2F1[1, -n, 1 - n, ((a + b)*Cos[c + d*x])/(b + a*Cos[c + d*x])] - (2^n*Hypergeometric2F1[-n, -n
, 1 - n, ((-a + b)*Cos[c + d*x]*Sec[(c + d*x)/2]^2)/(2*b)])/(((b + a*Cos[c + d*x])*Sec[(c + d*x)/2]^2)/b)^n)*(
a + b*Sec[c + d*x])^n)/(2*d*n)

________________________________________________________________________________________

Maple [F]  time = 0.241, size = 0, normalized size = 0. \begin{align*} \int \csc \left ( dx+c \right ) \left ( a+b\sec \left ( dx+c \right ) \right ) ^{n}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(csc(d*x+c)*(a+b*sec(d*x+c))^n,x)

[Out]

int(csc(d*x+c)*(a+b*sec(d*x+c))^n,x)

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (b \sec \left (d x + c\right ) + a\right )}^{n} \csc \left (d x + c\right )\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)*(a+b*sec(d*x+c))^n,x, algorithm="maxima")

[Out]

integrate((b*sec(d*x + c) + a)^n*csc(d*x + c), x)

________________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left ({\left (b \sec \left (d x + c\right ) + a\right )}^{n} \csc \left (d x + c\right ), x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)*(a+b*sec(d*x+c))^n,x, algorithm="fricas")

[Out]

integral((b*sec(d*x + c) + a)^n*csc(d*x + c), x)

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)*(a+b*sec(d*x+c))**n,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (b \sec \left (d x + c\right ) + a\right )}^{n} \csc \left (d x + c\right )\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)*(a+b*sec(d*x+c))^n,x, algorithm="giac")

[Out]

integrate((b*sec(d*x + c) + a)^n*csc(d*x + c), x)